# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=ktrip
pkgver=24.02.2
pkgrel=0
pkgdesc="A public transport assistant"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://invent.kde.org/utilities/ktrip"
license="GPL-2.0-only OR GPL-3.0-only"
depends="
	kde-icons
	kirigami
	kirigami-addons
	qqc2-desktop-style
	sonnet
	"
makedepends="
	extra-cmake-modules
	kconfig-dev
	kcontacts-dev
	ki18n-dev
	kirigami-addons-dev
	kitemmodels-dev
	kpublictransport-dev
	qqc2-desktop-style-dev
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	samurai
	"
_repo_url="https://invent.kde.org/utilities/ktrip.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/ktrip-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DKF_IGNORE_PLATFORM_CHECK=ON
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
ecc12607c7bf0c055535a9193cc67f69f14c8b56f8d5f485268b97b2385c1428e1289fb1eb624069cfa97ece5db63352dd36b249c33b592aa7fb06136c6879d3  ktrip-24.02.2.tar.xz
"
